import React from 'react';
import ReactDOM from 'react-dom/client';
import 'antd/dist/antd.min.css';
import { ConfigProvider } from 'antd';
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
import { Provider } from 'react-redux';
import zhCN from 'antd/es/locale/zh_CN';
import 'moment/locale/zh-cn';
import 'antd/dist/antd.less';
import AppLayout from './layout';
import './styles/index.scss'
import AppLogin from './views/LoginApp/index';
import store from './store';

const App = () => (
  <Router>
    <Provider store={store}>
      <ConfigProvider locale={zhCN} componentSize={'middle'} form={{ validateMessage: '介是嘛' }}>
        <div className="container">
          <Switch>
            <Route path="/login" component={AppLogin} />
            <Route path="/" component={AppLayout} />
          </Switch>
        </div>
      </ConfigProvider>
    </Provider>
  </Router>

)

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <App />,
);
